<?php

namespace App\Listeners;

use App\Events\AdminHanderEvent;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use App\Models\AdminHandlerLog;


class AdminHandlerListener
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Handle the event.
     *
     * @param  AdminHanderEvent  $event
     * @return void
     */
    public function handle(AdminHanderEvent $event)
    {
        $data = $event->adminHandlerLog->toArray();
        AdminHandlerLog::create($data);
    }
}
